import React from 'react';
import '../css/me.css';
// import $ from 'jquery';
// import {BrowserRouter as Router,Route,NavLink,Prompt} from 'react-router-dom';
function getCookie(name){
	var str = document.cookie;
	var arr = str.split("; ");
	for(var i = 0; i < arr.length; i++){
		var arr1 = arr[i].split("=");
		if(arr1[0]==name){
			return arr1[1];
		}
	}
}
function setCookie(name,val,n){
	var oDate = new Date();
	oDate.setDate(oDate.getDate()+n);
	document.cookie = name + "=" + val + ";expires="+ oDate ;
}
function removeCookie(name){
	setCookie(name,1,-1);
}
var aname=getCookie("mingzi")
console.log(aname)

class Mycenter extends React.Component{
	constructor(props){
		super(props)
		this.state={
			list:[],
			isshow:false
		}
	}
	setup(){
		this.props.history.push('/setput')
	}
	message(){
		this.props.history.push('/news')
	}

	
	
	
	render(){
		return(
			<div className='mycenter'>
				<div className='me'>   
					<header className='me-header'>
						<span onClick={this.setup.bind(this)}>设置</span>
						<span onClick={this.message.bind(this)}>消息</span>
					</header>

					<section className='me-section'>
					<div>
						<ul>
							<li>
								<span className='touxiang'>头像</span>
								<span>
									<p>{aname}</p>
								</span>
								<span className='renz'>去认证</span>
							</li>
							<li>
								<a href='#'>足迹</a>
								<a href='#'>积分</a>
								<a href='#'>优惠券</a>
							</li>
						</ul>
					</div>
					<div>
						<ul>
							<li>
								<span>采购订单</span>
								<span>></span>
							</li>
							<li>
								<span>采购统计</span>
								<span>></span>
							</li>
						</ul>
					</div>

					<div>
						<ul>
							<li>
								<span>销售订单</span>
								<span>></span>
							</li>
							<li>
								<span>销售统计</span>
								<span>></span>
							</li>
						</ul>
					</div>

					<div>
						<ul>
							<li>
								<span>我的收藏</span>
								<span>></span>
							</li>
							<li>
								<span>我的账户</span>
								<span>></span>
							</li>
						</ul>
					</div>

					<div>
						<ul>
							<li>
								<span>求购管理</span>
								<span>></span>
							</li>
							<li>
								<span>收获管理</span>
								<span>></span>
							</li>
							<li>
								<span>首营管理</span>
								<span>></span>
							</li>
							<li>
								<span>发票抬头</span>
								<span>></span>
							</li>
						</ul>
					</div>
					</section>
					

					
				</div>


				
				
				<div className='bgm'>
					<div className='bgmtop'>
					
					</div>
				</div>
				
			</div>	
        )
    }

}
export default Mycenter